{% extends 'trash.html' %}
{% block active_questions %}class="active"{% endblock %}
{% block trash %}
{% if questions %}
    <table 
        class="table table-bordered table-striped table-condensed table-hover">
        <tr>
            <th>Question</th>
            <th>Creator</th>
            <th style="text-align: center;">Trash date</th>
            <th style="text-align: center;">Restore</th>
            <th style="text-align: center;">Delete</th>
        </tr>
        {% for question in questions %}
        <tr>
            <td><a href="{% url 'question.views.show' question_id=question.id %}">{{ question.question }}</a></td>
            <td><a href="{% url 'account.views.view_user' id=question.created_by.id %}">{{ question.created_by }}</a></td>
            <td>{{ question.modified }}</td>
            <td style="text-align: center;"><a href="{% url 'trash.views.restore_question' question_id=question.id %}"><i class="icon-repeat"></i></a></td>
            <td style="text-align: center;"><a href="{% url 'question.views.delete' question_id=question.id %}"><i class="icon-remove"></i></a></td>
        </tr>
        {% endfor %}
    </table>
{% else %}
    <p>There are no trashed questions.</p>
{% endif %}
{% endblock %}
